using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._SpatialAnalystTools._Hydrology
{
    /// <summary>
    /// <para>Fill</para>
    /// <para>Fills sinks in a surface raster to remove small imperfections in the data.</para>
    /// <para>填充表面栅格中的水槽以移除数据中的小缺陷。</para>
    /// </summary>    
    [DisplayName("Fill")]
    public class Fill : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public Fill()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_surface_raster">
        /// <para>Input surface raster</para>
        /// <para>The input raster representing a continuous surface.</para>
        /// <para>表示连续表面的输入栅格。</para>
        /// </param>
        /// <param name="_out_surface_raster">
        /// <para>Output surface raster</para>
        /// <para><xdoc>
        ///   <para>The output surface raster after the sinks have been filled.</para>
        ///   <para>If the surface raster is integer, the output filled raster will be integer type. If the input is floating point, the output raster will be floating point.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>填充汇后的输出表面栅格。</para>
        ///   <para>如果表面栅格为整数，则输出填充栅格将为整数类型。如果输入为浮点，则输出栅格将为浮点。</para>
        /// </xdoc></para>
        /// </param>
        public Fill(object _in_surface_raster, object _out_surface_raster)
        {
            this._in_surface_raster = _in_surface_raster;
            this._out_surface_raster = _out_surface_raster;
        }
        public override string ToolboxName => "Spatial Analyst Tools";

        public override string ToolName => "Fill";

        public override string CallName => "sa.Fill";

        public override List<string> AcceptEnvironments => ["autoCommit", "cellSize", "cellSizeProjectionMethod", "compression", "configKeyword", "extent", "geographicTransformations", "mask", "outputCoordinateSystem", "parallelProcessingFactor", "scratchWorkspace", "snapRaster", "tileSize", "workspace"];

        public override object[] ParameterInfo => [_in_surface_raster, _out_surface_raster, _z_limit];

        /// <summary>
        /// <para>Input surface raster</para>
        /// <para>The input raster representing a continuous surface.</para>
        /// <para>表示连续表面的输入栅格。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input surface raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_surface_raster { get; set; }


        /// <summary>
        /// <para>Output surface raster</para>
        /// <para><xdoc>
        ///   <para>The output surface raster after the sinks have been filled.</para>
        ///   <para>If the surface raster is integer, the output filled raster will be integer type. If the input is floating point, the output raster will be floating point.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>填充汇后的输出表面栅格。</para>
        ///   <para>如果表面栅格为整数，则输出填充栅格将为整数类型。如果输入为浮点，则输出栅格将为浮点。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output surface raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_surface_raster { get; set; }


        /// <summary>
        /// <para>Z limit</para>
        /// <para><xdoc>
        ///   <para>Maximum elevation difference between a sink and its pour point to be filled.</para>
        ///   <para>If the difference in z-values between a sink and its pour point is greater than the z_limit, that sink will not be filled.</para>
        ///   <para>The value for z-limit must be greater than zero.</para>
        ///   <para>Unless a value is specified for this parameter, all sinks will be filled, regardless of depth.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>水槽与要填充的倾点之间的最大高程差。</para>
        ///   <para>如果汇点与其倾点之间的 z 值差大于z_limit，则不会填充该汇。</para>
        ///   <para>z-limit 的值必须大于零。</para>
        ///   <para>除非为此参数指定了值，否则无论深度如何，都将填充所有接收器。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Z limit")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double? _z_limit { get; set; } = null;


        public Fill SetEnv(int? autoCommit = null, object cellSize = null, object compression = null, object configKeyword = null, object extent = null, object geographicTransformations = null, object mask = null, object outputCoordinateSystem = null, object parallelProcessingFactor = null, object scratchWorkspace = null, object snapRaster = null, double[] tileSize = null, object workspace = null)
        {
            base.SetEnv(autoCommit: autoCommit, cellSize: cellSize, compression: compression, configKeyword: configKeyword, extent: extent, geographicTransformations: geographicTransformations, mask: mask, outputCoordinateSystem: outputCoordinateSystem, parallelProcessingFactor: parallelProcessingFactor, scratchWorkspace: scratchWorkspace, snapRaster: snapRaster, tileSize: tileSize, workspace: workspace);
            return this;
        }

    }

}